#include "Test.h"


int main()
{
  // 实现一个my_file* 
  // 实现对fopen,fclose,fwrite, fflush等
  
  My_File* fd = fopen_("my_open_.txt", "w");
  if (fd == NULL)
  {
    perror("fail fopen_");
    exit(-1);
  } 
  
  fputs_("one: \n", fd);
  sleep(1);
  fputs_("two: \n", fd);
  sleep(1);
  fputs_("tree: \n",fd);
  sleep(1);
  fputs_("four: \n",fd);
  sleep(1);
  fflush_(fd);

  fclose_(fd);
  return 0;
}
